﻿using System;
using System.Collections.Generic;
using System.Text;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Servico.Bovespa.ResumoFinanceiro.Service.ServiceContract;

namespace Sinacor.Servico.Bovespa.ResumoFinanceiro.Service.ServiceImplementation
{
    [SinacorServiceBehavior]
    public class FinanceiroPendente : IFinanceiroPendente
    {
        #region Contrutor

        public FinanceiroPendente()
        {
        }

        #endregion

        #region IFinanceiroPendente Members

        /// <summary>
        /// Consulta Financeiros Pendentes
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public List<DataContract.Response.FinanceiroPendenteResponse> ConsultarFinanceirosPendentes(DataContract.Request.FiltroFinanceiroPendenteRequest request)
        {
            BusinessLogic.FinanceiroPendente blFinanceiroPendente = new BusinessLogic.FinanceiroPendente();
            List<DataContract.Response.FinanceiroPendenteResponse> retorno = null;
            Translator.BusinessEntityToDataContract.FinanceiroPendente toDCFinanceiroPendente = new Translator.BusinessEntityToDataContract.FinanceiroPendente();
            Translator.DataContractToBusinessEntity.FinanceiroPendente toBEFinanceiroPendente = new Translator.DataContractToBusinessEntity.FinanceiroPendente();

            retorno = toDCFinanceiroPendente.ToFinanceiroPendenteResponse(blFinanceiroPendente.ConsultarFinanceirosPendentes(toBEFinanceiroPendente.ToFiltroFinanceiroPendente(request)));

            return retorno;
        }

        #endregion
    }
}
